<?php
namespace Home\Controller;
use Think\Controller;
class ClubController extends Controller {


	public function clublist(){
		$clubModel=M('club_info');
		$club=$clubModel->order('club_id asc')->select();
		echo json_encode($club);
	}
	public function club_info(){
		$clubModel=M('club_info');
		$club_id=$_GET['club_id'];
		$result=$clubModel->where("club_id='$club_id'")->select();
		echo json_encode($result);
	}
		public function classlist(){
		$class=M('club_class');
		$club_id=$_GET['club_id'];
		$result=$class->where("club_id='$club_id'")->select();
		//dump($result);
		echo json_encode($result);
	}
	public function videolist(){
		$video=M('club_video');
		$club_id=$_GET['club_id'];
		$result=$video->where("club_id='$club_id'")->select();
		echo json_encode($result);
	}
	public function typelist(){
		$videoModel=M('club_video');
		$club_video_type_id=$_GET['club_video_type_id'];//类型表的id
        $result=$videoModel->where("club_video_type='$club_video_type_id'")->select();
        echo json_encode($result);
		
	}
}
?>